package com.tars.txtm.enums;


/**
 * @author: Franz 2022/3/19
 */
public enum TxEnum {

    commit(1,"提交"),

    rollback(0,"回滚");

    public Integer type;

    public String label;

    TxEnum(int type, String label) {
        this.type = type;
        this.label = label;
    }

    public static TxEnum getType(Integer type){
        for (TxEnum value : values()) {
            if(value.type.equals(type)){
                return value;
            }
        }
        return null;
    }
}
